<?php
/**
 * @author Radovan Dvorsky
 * @version 20091216
 */
require_once ('Zend/Form.php');

class Form_Subject_Add extends Zend_Form {
	
	public function __construct($options = null) {
		parent::__construct ($options);		
		
		$this->setMethod('post');
		$this->addDecorator('Fieldset',array('legend' => 'Pridať predmet'));
		
		$name = new Zend_Form_Element_Text('subjectName');
		$name->setRequired(true)	
		->addValidator('StringLength',false, array(2,70))
		->addFilter('StringTrim')
		->addFilter('StripTags')
		->setLabel('Meno predmentu');	
				
		/**
		 * @deprecated Submit button sa uz nepouziva
		 */
		$submit = new Zend_Form_Element_Submit('subjectSubmit');		
		$submit->setLabel('Pridať');
		
		
		$this->addElements(array($name));	
	}
}
?>